import request from '@/utils/request'

// 查询报表信息列表
export function listReport(query) {
  return request({
    url: '/reportworld/report/list',
    method: 'get',
    params: query
  })
}

// 查询报表信息详细
export function getReport(data) {
  return request({
    url: '/reportworld/report/getReport',
    method: 'post',
    data: data
  })
}

// 新增报表信息
export function addReport(data) {
  return request({
    url: '/reportworld/report',
    method: 'post',
    data: data
  })
}

// 修改报表信息
export function updateReport(data) {
  return request({
    url: '/reportworld/report',
    method: 'put',
    data: data
  })
}

// 删除报表信息
export function delReport(id, hisVersion) {
  const data = {
    id,
    hisVersion
  };
  return request({
    url: '/reportworld/report/remove',
    method: 'post',
    data: data
  })
}

// 初始化查询
export function init(data) {
  return request({
    url: '/reportworld/report/init',
    method: 'post',
    data: data
  })
}
